namespace Lzfy_His_Service.Models.Configuration
{
    /// <summary>
    /// 健康检查配置选项
    /// </summary>
    public class HealthCheckOptions
    {
        /// <summary>
        /// 检查间隔（分钟）
        /// </summary>
        public int CheckIntervalMinutes { get; set; } = 5;

        /// <summary>
        /// 内存阈值（MB）
        /// </summary>
        public int MemoryThresholdMB { get; set; } = 1024;

        /// <summary>
        /// 数据库超时时间（秒）
        /// </summary>
        public int DatabaseTimeoutSeconds { get; set; } = 30;

        /// <summary>
        /// 最大连续错误次数
        /// </summary>
        public int MaxConsecutiveErrors { get; set; } = 5;

        /// <summary>
        /// 错误重置间隔（分钟）
        /// </summary>
        public int ErrorResetIntervalMinutes { get; set; } = 60;
    }

    /// <summary>
    /// 稳定性配置选项
    /// </summary>
    public class StabilityOptions
    {
        /// <summary>
        /// 最大连续数据库错误次数
        /// </summary>
        public int MaxConsecutiveDbErrors { get; set; } = 10;

        /// <summary>
        /// 数据库错误重置间隔（分钟）
        /// </summary>
        public int DbErrorResetIntervalMinutes { get; set; } = 30;

        /// <summary>
        /// 关键异常阈值
        /// </summary>
        public int CriticalExceptionThreshold { get; set; } = 20;

        /// <summary>
        /// 异常统计重置间隔（分钟）
        /// </summary>
        public int ExceptionStatsResetIntervalMinutes { get; set; } = 60;

        /// <summary>
        /// 启用自动恢复
        /// </summary>
        public bool EnableAutoRecovery { get; set; } = true;

        /// <summary>
        /// 垃圾回收阈值
        /// </summary>
        public int GcCollectionThreshold { get; set; } = 5;
    }
}